//package com.qujia.station.controller;
//
//import com.qujia.common.annotation.Log;
//import com.qujia.common.core.controller.BaseController;
//import com.qujia.common.core.domain.AjaxResult;
//import com.qujia.common.core.redis.RedisCache;
//import com.qujia.common.enums.BusinessType;
//import com.qujia.common.utils.StringUtils;
////import com.qujia.customer.service.ICustomerCardUseRecordService;
//import com.qujia.station.domain.PayOrder;
//import com.qujia.station.service.*;
//import com.qujia.system.domain.HttpUtils;
//import com.qujia.system.service.ISysDeptService;
//import com.qujia.system.service.ISysUserService;
//import io.swagger.annotations.Api;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//
//@Api("订单信息")
//@RestController
//@RequestMapping("/syncOrder")
//public class OrderSyncController extends BaseController {
//    @Autowired
//    private IPayOrderService payOrderService;
//    @Autowired
//    private ISysDeptService deptService;
//
//    @Autowired
//    private IPayOrderHistoryService payOrderHistoryService;
//    @Autowired
//    private IStationDeviceManageService stationDeviceManageService;
//
//    @Autowired
//    private IStationBalanceChangeService stationBalanceChangeService;
//
//
//    @Autowired
//    private IStationService stationService;
//    @Autowired
//    private ISysUserService userService;
//
////    @Autowired
////    private ICustomerCardUseRecordService customerCardUseRecordService;
//
//    @Resource
//    private RedisCache redisCache;
//
//    @Resource
//    private InvoiceService invoiceService;
//
//    @Value("${qujia.payBaseUrl}")
//    private String payBaseUrl;
//
//
//    @Log(title = "订单支付", businessType = BusinessType.UPDATE)
//    @PostMapping("/updateOrder/{timestamp}/{sign}")
//    public AjaxResult edit(@RequestBody PayOrder payOrder) {
//        return toAjax(payOrderService.updatePayOrderByOrderNo(payOrder));
//    }
//
//    @GetMapping(value = "/{orderId}/{timestamp}/{sign}")
//    public AjaxResult getInfo(@PathVariable("orderId") String orderId) {
//        return AjaxResult.success(payOrderService.selectPayOrderById(Long.parseLong(orderId)));
//    }
//
//    @Log(title = "订单支付", businessType = BusinessType.INSERT)
//    @PostMapping("/addOrder/{timestamp}/{sign}")
//    public AjaxResult add(@RequestBody PayOrder payOrder) {
//        return payOrderService.insertPayOrderForStar(payOrder);
//    }
//
//    @Log(title = "电子卡支付", businessType = BusinessType.INSERT)
//    @PostMapping("/dzkPay/{timestamp}/{sign}")
//    public AjaxResult dzkPay(@RequestParam String ordNo, String couponUserId) {
//        if(StringUtils.isEmpty(ordNo)){
//            AjaxResult.error("订单号不能为空");
//        }
//        String url=payBaseUrl+"/dzkPaySetV2?ordNo="+ordNo;
//        String result="";
//        try {
//            result = HttpUtils.connectGetUrl(url);
//        } catch (Exception e) {
//            AjaxResult.error(e.getMessage());
//        }
//        return AjaxResult.success(result);
//    }
//}
